<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="app">
        <div>水果列表</div>
        <ul>
            <li v-for="item in fruits">{{item}}</li>
            <li v-for="(item ,index) in fruits">{{item+ '--------' +index}}</li>
            <li :key="item" v-for="(item,index) in myfruits">
                <span>{{item.ename}}</span>
                <span>{{item.cname}}</span>
            </li>
        </ul>
       
    </div>
    <script>
        var vm = new Vue({
            el:'#app',
            data:{
                fruits:['apple','orange','banana'],
                myfruits:[{
                    id :1,
                    ename:'apple',
                    cname:'苹果'
                },{
                    id : 2,
                    ename:'orange',
                    cname:'橘子'
                },{
                    id : 3,
                    ename:'banana',
                    cname:'香蕉'
                }]
            },
            methods:function(){

            }
        })
    </script>
</body>
</html>